package ua.kpi_java_training.morochenets.module2;

/**
 * The main class in which to run the process of life in the pool
 *
 * @author Ari100tell
 * @version 1.00.00
 * @data: 31.05.13
 * @time: 21:00
 */
public class Main {


    /**
     * @param args not used
     */

    public static void main(String[] args) {
        new Main().runMain();
    }

    /**
     * Run simulations of life in the pool
     */
    public void runMain() {
        InitialConditions initialConditions = new InitialConditions();

        Pool pool = new Pool(initialConditions.getWidth(), initialConditions.getLength(),
                initialConditions.getNumberPreys(), initialConditions.getNumberPredators());
        int[][] placesForLife = pool.completionPool();
        LifeCycles lifeCycles = new LifeCycles(initialConditions.getNumberCycles(), pool.getLength(), pool.getWidth());
        lifeCycles.runModel(placesForLife);
        StatisticalResults statisticalResults = new StatisticalResults(pool.getLength(), pool.getWidth());
        statisticalResults.outputAll(placesForLife);
    }
}
